﻿Public Class ut514_dtl
    Inherits System.Web.UI.Page

	Private Property DataSource As Data.DataTable
		Get
			Return Me.Session("datasourceut514dtl")
		End Get
		Set(ByVal value As Data.DataTable)
			Me.Session("datasourceut514dtl") = value
		End Set
	End Property

	Private Property SelectDate As String
		Get
			Return Me.ViewState("SelectDate")
		End Get
		Set(ByVal value As String)
			Me.ViewState("SelectDate") = value
		End Set
	End Property

	Private Property FileType As String
		Get
			Return Me.ViewState("FileType")
		End Get
		Set(ByVal value As String)
			Me.ViewState("FileType") = value
		End Set
	End Property

	Private Property Reson As String
		Get
			Return Me.ViewState("Reson")
		End Get
		Set(ByVal value As String)
			Me.ViewState("Reson") = value
		End Set
	End Property

	Private Property TranType As String
		Get
			Return Me.ViewState("TranType")
		End Get
		Set(ByVal value As String)
			Me.ViewState("TranType") = value
		End Set
	End Property

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		If Not Page.IsPostBack Then
			Me.SelectDate = Me.Request.QueryString("seldate")
			Me.FileType = Me.Request.QueryString("filetype")
			Me.Reson = Me.Request.QueryString("reson")
			Me.TranType = Me.Request.QueryString("trantype")
			DataSource = BL.Report.ReportUT514_Detail(Me.SelectDate, Me.SelectDate, Me.FileType, Me.TranType)
			Me.lblFileType.Text = Me.FileType
			Me.lblTranType.Text = Me.TranType
			Me.lblReson.Text = Me.Reson
			Bind(0)
		End If
	End Sub

	Private Sub Bind(ByVal pageIndex As Integer)
		Me.gvList.DataSource = DataSource
		Me.gvList.PageIndex = pageIndex
		Me.gvList.DataBind()
	End Sub

	Private Sub gvList_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvList.PageIndexChanging
		Bind(e.NewPageIndex)
	End Sub

End Class